package com.yonyou.crm.sys.dynamic.builder;

import net.sf.json.JSONObject;

//链接
public class Link {
	/**
	 * 链接显示标题
	 */
	private String title;
	/**
	 * 链接指向的对象类型
	 */
	private String objType;
	/**
	 * 链接指向的对象ID
	 */
	private Long objId;
	/**
	 * 对象的显示VIEW
	 */
	private String showView;
	/**
	 * 获取数据的URL
	 */
	private String url;
	
	public Link() {
		super();
	}
	public Link(String title, String objType, Long objId, String showView,
			String url) {
		super();
		this.title = title;
		this.objType = objType;
		this.objId = objId;
		this.showView = showView;
		this.url = url;
	}
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public String getObjType() {
		return objType;
	}
	public void setObjType(String objType) {
		this.objType = objType;
	}
	public Long getObjId() {
		return objId;
	}
	public void setObjId(Long objId) {
		this.objId = objId;
	}
	public String getShowView() {
		return showView;
	}
	public void setShowView(String showView) {
		this.showView = showView;
	}
	public String getUrl() {
		return url;
	}
	public void setUrl(String url) {
		this.url = url;
	}
	public JSONObject toJSONObject() {
		return JSONObject.fromObject(this);
	}
	public boolean equals(Link l) {
		return objId.equals(l.objId) && objType.equals(l.objType) ;
	}
	
}
